// index.js

Page({
  data: {
    userid: '',
    user: undefined,
    menus: [
      {id:1, title: 'GK维护',desc: 'GK信息，出货时间等', router:'gk_info.js'},
      {id:2, title: 'GK字典维护',desc: 'GK信息，最基础信息处理', router:'gk_dict.js'},
    ],
  },
  onLoad() {
    if (wx.$storage.isLogin()) {
      this.setData({
        userid: wx.$storage.getUserId(),
        user: wx.$storage.getUser(),
      })
    } else {
      wx.$navigator.toLogin();
    }
  },
  onItemClick(e) {
    let item = wx.$base.getItem(e)
    if (item.router) {
      wx.$navigator.push(item.router)
    }
  }
})
